3.199 \(\int (d+e x)^2 \log (c (a+\frac{b}{x})^p) \, dx\)

Optimal. Leaf size=102 \[ \frac{b e p x (3 a d-b e)}{3 a^2}-\frac{p (a d-b e)^3 \log (a x+b)}{3 a^3 e}+\frac{(d+e x)^3 \log \left (c \left (a+\frac{b}{x}\right )^p\right )}{3 e}+\frac{b e^2 p x^2}{6 a}+\frac{d^3 p \log (x)}{3 e} \]

[Out]

(b*e*(3*a*d - b*e)*p*x)/(3*a^2) + (b*e^2*p*x^2)/(6*a) + ((d + e*x)^3*Log[c*(a + b/x)^p])/(3*e) + (d^3*p*Log[x]
)/(3*e) - ((a*d - b*e)^3*p*Log[b + a*x])/(3*a^3*e)

________________________________________________________________________________________

Rubi [A]  time = 0.093517, antiderivative size = 102, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15, Rules used = {2463, 514, 72} \[ \frac{b e p x (3 a d-b e)}{3 a^2}-\frac{p (a d-b e)^3 \log (a x+b)}{3 a^3 e}+\frac{(d+e x)^3 \log \left (c \left (a+\frac{b}{x}\right )^p\right )}{3 e}+\frac{b e^2 p x^2}{6 a}+\frac{d^3 p \log (x)}{3 e} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)^2*Log[c*(a + b/x)^p],x]

[Out]

(b*e*(3*a*d - b*e)*p*x)/(3*a^2) + (b*e^2*p*x^2)/(6*a) + ((d + e*x)^3*Log[c*(a + b/x)^p])/(3*e) + (d^3*p*Log[x]
)/(3*e) - ((a*d - b*e)^3*p*Log[b + a*x])/(3*a^3*e)

Rule 2463

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))*((f_.) + (g_.)*(x_))^(r_.), x_Symbol] :> Simp[((
f + g*x)^(r + 1)*(a + b*Log[c*(d + e*x^n)^p]))/(g*(r + 1)), x] - Dist[(b*e*n*p)/(g*(r + 1)), Int[(x^(n - 1)*(f
 + g*x)^(r + 1))/(d + e*x^n), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, r}, x] && (IGtQ[r, 0] || RationalQ[n
]) && NeQ[r, -1]

Rule 514

Int[(x_)^(m_.)*((c_) + (d_.)*(x_)^(mn_.))^(q_.)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[x^(m - n*q)*
(a + b*x^n)^p*(d + c*x^n)^q, x] /; FreeQ[{a, b, c, d, m, n, p}, x] && EqQ[mn, -n] && IntegerQ[q] && (PosQ[n] |
|  !IntegerQ[p])

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rubi steps

\begin{align*} \int (d+e x)^2 \log \left (c \left (a+\frac{b}{x}\right )^p\right ) \, dx &=\frac{(d+e x)^3 \log \left (c \left (a+\frac{b}{x}\right )^p\right )}{3 e}+\frac{(b p) \int \frac{(d+e x)^3}{\left (a+\frac{b}{x}\right ) x^2} \, dx}{3 e}\\ &=\frac{(d+e x)^3 \log \left (c \left (a+\frac{b}{x}\right )^p\right )}{3 e}+\frac{(b p) \int \frac{(d+e x)^3}{x (b+a x)} \, dx}{3 e}\\ &=\frac{(d+e x)^3 \log \left (c \left (a+\frac{b}{x}\right )^p\right )}{3 e}+\frac{(b p) \int \left (\frac{e^2 (3 a d-b e)}{a^2}+\frac{d^3}{b x}+\frac{e^3 x}{a}-\frac{(a d-b e)^3}{a^2 b (b+a x)}\right ) \, dx}{3 e}\\ &=\frac{b e (3 a d-b e) p x}{3 a^2}+\frac{b e^2 p x^2}{6 a}+\frac{(d+e x)^3 \log \left (c \left (a+\frac{b}{x}\right )^p\right )}{3 e}+\frac{d^3 p \log (x)}{3 e}-\frac{(a d-b e)^3 p \log (b+a x)}{3 a^3 e}\\ \end{align*}

Mathematica [A]  time = 0.0813943, size = 86, normalized size = 0.84 \[ \frac{2 a^3 (d+e x)^3 \log \left (c \left (a+\frac{b}{x}\right )^p\right )+p \left (2 a^3 d^3 \log (x)+a b e^2 x (6 a d+a e x-2 b e)-2 (a d-b e)^3 \log (a x+b)\right )}{6 a^3 e} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)^2*Log[c*(a + b/x)^p],x]

[Out]

(2*a^3*(d + e*x)^3*Log[c*(a + b/x)^p] + p*(a*b*e^2*x*(6*a*d - 2*b*e + a*e*x) + 2*a^3*d^3*Log[x] - 2*(a*d - b*e
)^3*Log[b + a*x]))/(6*a^3*e)

________________________________________________________________________________________

Maple [F]  time = 0.355, size = 0, normalized size = 0. \begin{align*} \int \left ( ex+d \right ) ^{2}\ln \left ( c \left ( a+{\frac{b}{x}} \right ) ^{p} \right ) \, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*ln(c*(a+b/x)^p),x)

[Out]

int((e*x+d)^2*ln(c*(a+b/x)^p),x)

________________________________________________________________________________________

Maxima [A]  time = 1.03793, size = 138, normalized size = 1.35 \begin{align*} \frac{1}{6} \, b p{\left (\frac{a e^{2} x^{2} + 2 \,{\left (3 \, a d e - b e^{2}\right )} x}{a^{2}} + \frac{2 \,{\left (3 \, a^{2} d^{2} - 3 \, a b d e + b^{2} e^{2}\right )} \log \left (a x + b\right )}{a^{3}}\right )} + \frac{1}{3} \,{\left (e^{2} x^{3} + 3 \, d e x^{2} + 3 \, d^{2} x\right )} \log \left ({\left (a + \frac{b}{x}\right )}^{p} c\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*log(c*(a+b/x)^p),x, algorithm="maxima")

[Out]

1/6*b*p*((a*e^2*x^2 + 2*(3*a*d*e - b*e^2)*x)/a^2 + 2*(3*a^2*d^2 - 3*a*b*d*e + b^2*e^2)*log(a*x + b)/a^3) + 1/3
*(e^2*x^3 + 3*d*e*x^2 + 3*d^2*x)*log((a + b/x)^p*c)

________________________________________________________________________________________

Fricas [A]  time = 1.7112, size = 329, normalized size = 3.23 \begin{align*} \frac{a^{2} b e^{2} p x^{2} + 2 \,{\left (3 \, a^{2} b d e - a b^{2} e^{2}\right )} p x + 2 \,{\left (3 \, a^{2} b d^{2} - 3 \, a b^{2} d e + b^{3} e^{2}\right )} p \log \left (a x + b\right ) + 2 \,{\left (a^{3} e^{2} x^{3} + 3 \, a^{3} d e x^{2} + 3 \, a^{3} d^{2} x\right )} \log \left (c\right ) + 2 \,{\left (a^{3} e^{2} p x^{3} + 3 \, a^{3} d e p x^{2} + 3 \, a^{3} d^{2} p x\right )} \log \left (\frac{a x + b}{x}\right )}{6 \, a^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*log(c*(a+b/x)^p),x, algorithm="fricas")

[Out]

1/6*(a^2*b*e^2*p*x^2 + 2*(3*a^2*b*d*e - a*b^2*e^2)*p*x + 2*(3*a^2*b*d^2 - 3*a*b^2*d*e + b^3*e^2)*p*log(a*x + b
) + 2*(a^3*e^2*x^3 + 3*a^3*d*e*x^2 + 3*a^3*d^2*x)*log(c) + 2*(a^3*e^2*p*x^3 + 3*a^3*d*e*p*x^2 + 3*a^3*d^2*p*x)
*log((a*x + b)/x))/a^3

________________________________________________________________________________________

Sympy [A]  time = 8.27237, size = 298, normalized size = 2.92 \begin{align*} \begin{cases} d^{2} p x \log{\left (a + \frac{b}{x} \right )} + d^{2} x \log{\left (c \right )} + d e p x^{2} \log{\left (a + \frac{b}{x} \right )} + d e x^{2} \log{\left (c \right )} + \frac{e^{2} p x^{3} \log{\left (a + \frac{b}{x} \right )}}{3} + \frac{e^{2} x^{3} \log{\left (c \right )}}{3} + \frac{b d^{2} p \log{\left (x + \frac{b}{a} \right )}}{a} + \frac{b d e p x}{a} + \frac{b e^{2} p x^{2}}{6 a} - \frac{b^{2} d e p \log{\left (x + \frac{b}{a} \right )}}{a^{2}} - \frac{b^{2} e^{2} p x}{3 a^{2}} + \frac{b^{3} e^{2} p \log{\left (x + \frac{b}{a} \right )}}{3 a^{3}} & \text{for}\: a \neq 0 \\d^{2} p x \log{\left (b \right )} - d^{2} p x \log{\left (x \right )} + d^{2} p x + d^{2} x \log{\left (c \right )} + d e p x^{2} \log{\left (b \right )} - d e p x^{2} \log{\left (x \right )} + \frac{d e p x^{2}}{2} + d e x^{2} \log{\left (c \right )} + \frac{e^{2} p x^{3} \log{\left (b \right )}}{3} - \frac{e^{2} p x^{3} \log{\left (x \right )}}{3} + \frac{e^{2} p x^{3}}{9} + \frac{e^{2} x^{3} \log{\left (c \right )}}{3} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*ln(c*(a+b/x)**p),x)

[Out]

Piecewise((d**2*p*x*log(a + b/x) + d**2*x*log(c) + d*e*p*x**2*log(a + b/x) + d*e*x**2*log(c) + e**2*p*x**3*log
(a + b/x)/3 + e**2*x**3*log(c)/3 + b*d**2*p*log(x + b/a)/a + b*d*e*p*x/a + b*e**2*p*x**2/(6*a) - b**2*d*e*p*lo
g(x + b/a)/a**2 - b**2*e**2*p*x/(3*a**2) + b**3*e**2*p*log(x + b/a)/(3*a**3), Ne(a, 0)), (d**2*p*x*log(b) - d*
*2*p*x*log(x) + d**2*p*x + d**2*x*log(c) + d*e*p*x**2*log(b) - d*e*p*x**2*log(x) + d*e*p*x**2/2 + d*e*x**2*log
(c) + e**2*p*x**3*log(b)/3 - e**2*p*x**3*log(x)/3 + e**2*p*x**3/9 + e**2*x**3*log(c)/3, True))

________________________________________________________________________________________

Giac [B]  time = 1.15794, size = 284, normalized size = 2.78 \begin{align*} \frac{2 \, a^{3} p x^{3} e^{2} \log \left (a x + b\right ) + 6 \, a^{3} d p x^{2} e \log \left (a x + b\right ) - 2 \, a^{3} p x^{3} e^{2} \log \left (x\right ) - 6 \, a^{3} d p x^{2} e \log \left (x\right ) + 6 \, a^{3} d^{2} p x \log \left (a x + b\right ) + 2 \, a^{3} x^{3} e^{2} \log \left (c\right ) + 6 \, a^{3} d x^{2} e \log \left (c\right ) - 6 \, a^{3} d^{2} p x \log \left (x\right ) + a^{2} b p x^{2} e^{2} + 6 \, a^{2} b d p x e + 6 \, a^{2} b d^{2} p \log \left (a x + b\right ) - 6 \, a b^{2} d p e \log \left (a x + b\right ) + 6 \, a^{3} d^{2} x \log \left (c\right ) - 2 \, a b^{2} p x e^{2} + 2 \, b^{3} p e^{2} \log \left (a x + b\right )}{6 \, a^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*log(c*(a+b/x)^p),x, algorithm="giac")

[Out]

1/6*(2*a^3*p*x^3*e^2*log(a*x + b) + 6*a^3*d*p*x^2*e*log(a*x + b) - 2*a^3*p*x^3*e^2*log(x) - 6*a^3*d*p*x^2*e*lo
g(x) + 6*a^3*d^2*p*x*log(a*x + b) + 2*a^3*x^3*e^2*log(c) + 6*a^3*d*x^2*e*log(c) - 6*a^3*d^2*p*x*log(x) + a^2*b
*p*x^2*e^2 + 6*a^2*b*d*p*x*e + 6*a^2*b*d^2*p*log(a*x + b) - 6*a*b^2*d*p*e*log(a*x + b) + 6*a^3*d^2*x*log(c) -
2*a*b^2*p*x*e^2 + 2*b^3*p*e^2*log(a*x + b))/a^3